package com.wantup.miaosha.entity;



import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author 赵洛伟
 * @since 2019-06-06
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class TblOrderifno extends Model<TblOrderifno> {

    private static final long serialVersionUID = 1L;

    /**
     * 订单自增id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 用户id
     */
    @TableField("userId")
    private Integer userId;
    /**
     * 商品id
     */
    @TableField("goodsId")
    private Integer goodsId;
    /**
     * 收货地址id
     */
    @TableField("deliveryAddrId")
    private Integer deliveryAddrId;
    /**
     * 商品名称
     */
    @TableField("goodsName")
    private String goodsName;
    /**
     * 购买商品数量
     */
    @TableField("goodsCount")
    private Integer goodsCount;
    /**
     * 商品单价
     */
    @TableField("goodsPrice")
    private BigDecimal goodsPrice;
    /**
     * 订单来源(1.pc  2.Android 3. ios)
     */
    @TableField("orderChannel")
    private Integer orderChannel;
    /**
     * 订单状态(0.新建未支付 1.已支付2.已发货 3已收货 4.已退款5.已完成)
     */
    private Integer status;
    /**
     * 订单创建时间
     */
    @TableField("createDate")
    private Date createDate;
    /**
     * 支付时间
     */
    @TableField("payTime")
    private Date payTime;


    public static final String ID = "id";

    public static final String USERID = "userId";

    public static final String GOODSID = "goodsId";

    public static final String DELIVERYADDRID = "deliveryAddrId";

    public static final String GOODSNAME = "goodsName";

    public static final String GOODSCOUNT = "goodsCount";

    public static final String GOODSPRICE = "goodsPrice";

    public static final String ORDERCHANNEL = "orderChannel";

    public static final String STATUS = "status";

    public static final String CREATEDATE = "createDate";

    public static final String PAYTIME = "payTime";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
